-
-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(barcode-scanning): support cornerPoints
in readBarcodesFromImage(...)
#100
base: main
Are you sure you want to change the base?
Conversation
readbarcodesFromImage would return nothing(result or error) on an image not containing any barcode.
did the same for android for missing corner points. |
cornerPoints
in readBarcodesFromImage(...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please run npm run changeset
to create a changeset.
@@ -1,6 +1,6 @@ | |||
{ | |||
"name": "@capacitor-mlkit/barcode-scanning", | |||
"version": "5.3.0", | |||
"version": "5.3.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert this change.
@@ -30,7 +30,14 @@ public static JSObject createBarcodeResultForBarcode(@NonNull Barcode barcode, @ | |||
cornerPointsResult.put(cornerPointResult); | |||
} | |||
} | |||
|
|||
else if (cornerPoints != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also affects the scan(...)
method and leads to invalid values there, as these would have to be normalized.
For now, my suggestion is to make this dependent on the screenSize
parameter. If this parameter is set, corner points may only be returned normalized. I will improve this later.
else if (cornerPoints != null) { | |
else if (cornerPoints != null && screenSize == null) { |
Make sure that the screenSize
parameter is null
only for the readBarcodesFromImage(...)
method.
Please also apply this to iOS.
Pull request checklist
Please check if your PR fulfills the following requirements:
npm run changeset
).This improved two things :
Close #39 and for my personal usage